import 'package:flutter_company_app/conf/config.dart';
import 'package:http/http.dart' as http;

// 获取产品数据
postMessageResult(String msg) async {
  var url = Uri.http("${Config.IP}:${Config.PORT}", '/',
      {'action': 'contactCompany', 'msg': msg});
  var response = await http.get(url);
  if (response.statusCode == 200) {
    var body = response.body;
    print("数据请求成功");
    return body;
  } else {
    print('Request failed with status: ${response.statusCode}.');
  }
}
